package com.shiguo365.market.display.action;

import android.app.Activity;
import android.content.Intent;

import com.shiguo365.market.display.base.BaseActivity;
import com.shiguo365.market.utils.HandlerUtils;

/**
 * Created by CoderA on 2016/7/10.
 * 这个代码无法使用
 */
public class ItemAction{

    private static final String TAG = "ItemAction";
    private Class mGotoClz;
    private BaseActivity mBaseActivity;
    private Activity mActivity;

    public ItemAction(Activity activity, Class gotoClz){
        this.mActivity = activity;
        this.mGotoClz = gotoClz;
    }

    public void startDelayed() {
        HandlerUtils.postDelayed(new Runnable() {
            @Override
            public void run() {
                if(mBaseActivity != null)
                    mBaseActivity.startActivity(new Intent(mBaseActivity, mGotoClz));
                else
                    mActivity.startActivity(new Intent(mActivity, mGotoClz));
            }
        }, 100);
    }
}
